#!/usr/bin/env bash -e

# Usage:
# ./scripts/docker/run         : Starts the stable version
# ./scripts/docker/run testing : Starts the testing version

# Note: use lowercase names for the Docker images
DOCKER_IMAGE="azureiotpcs/pcs-remote-monitoring-webui"
STABLE_VERSION="1.0.0-preview"

if [ "$1" == "testing" ]; then
  echo "Starting Remote Monitoring Web UI [testing version] ..."
  docker run -it -p 10080:10080 -p 10443:10443 $DOCKER_IMAGE:testing
else
  echo "Starting Remote Monitoring Web UI [$STABLE_VERSION] ..."
  docker run -it -p 10080:10080 -p 10443:10443 $DOCKER_IMAGE:$STABLE_VERSION
fi